const Mock=require('mockjs');
let data=Mock.mock({
    "list":[
        {
            name:"推荐",
            "child|20":[{
                img:"@image(100X100,@color)",
                title:"@ctitle(2,3)"
            }],
        },
        {
            name:"电脑",
            "child|20":[{
                img:"@image(100X100,@color)",
                title:"@ctitle(2,3)"
            }]
        },
        {
            name:"食品",
            "child|20":[{
                img:"@image(100X100,@color)",
                title:"@ctitle(2,3)"
            }]
        },
        {
            name:"水果",
            "child|20":[{
                img:"@image(100X100,@color)",
                title:"@ctitle(2,3)"
            }]
        },
    ]
})
module.exports = {
    devServer:{
        before(app){
            app.get('/list',(req,res)=>{
                res.send(data.list)
            })
        }
    }
}